﻿#pragma once

#include "../MonsterObject.h"
#include "../../MirDatabase/MonsterInfo.h"
#include "../../../Shared/Enums.h"
#include "../PlayerObject.h"
#include "../MapObject.h"
#include <vector>
#include <any>

using namespace Server::MirDatabase;
namespace S = ServerPackets;

namespace Server::MirObjects::Monsters
{
    class IcePillar : public MonsterObject
    {
    protected:
        bool getCanMove() const override;
        bool getCanRegen() const override;

        IcePillar(MonsterInfo *info);

        void FindTarget() override;

    public:
        void Turn(MirDirection dir) override;
        bool Walk(MirDirection dir) override;

    protected:
        void ProcessRegen() override;
        void ProcessSearch() override;
        void ProcessRoam() override;

    public:
        int Attacked(MonsterObject *attacker, int damage, DefenceType type = DefenceType::ACAgility) override;

        int Attacked(PlayerObject *attacker, int damage, DefenceType type = DefenceType::ACAgility, bool damageWeapon = true) override;

        int Struck(int damage, DefenceType type = DefenceType::ACAgility) override;

        void ApplyPoison(Poison *p, MapObject *Caster = nullptr, bool NoResist = false, bool ignoreDefence = true) override;

    private:
        void CloseAttack(int damage);

    public:
        void Die() override;

    protected:
        void CompleteDeath(std::vector<std::any> &data) override;
    };
}
